import Vue from 'vue'
import Vuex from 'vuex'
import getters from './getters'
import mutations from './mutations'
import actions from './actions'
Vue.use(Vuex)

const state = {
	// 创建一个存储购物时的商品信息的数据类型，然后要存储到localStorage
	// 数据类型为：let carts = {'gid':{count:1,checked:true,goods:{}},'gid1',{count:1,checked:true,goods:{}}}
	carts: {},
}

const store = new Vuex.Store({
	state,
	getters,
	mutations,
	actions
})
export default store
